package book;

import java.util.Arrays;

public class Bookshelf {
    public Book[] books = new Book[10] ;
    int bookssize = books.length;
    public int number;

    public Bookshelf(){
        this.books[0] = new Book("三国演义","罗贯中",20,"小说");
        this.books[1] = new Book("西游记","吴承恩",21,"小说");
        this.books[2] = new Book("红楼梦","曹雪芹",22,"小说");

        this.number = 3;
    }


    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(int pos,Book book) {
        this.books[pos] = book;
    }

    public Book[] getBooks() {
        return books;
    }

    public void setBooks(Book[] books) {
        this.books = books;
    }

    public int getBookssize() {
        return bookssize;
    }

    public void setBookssize(int bookssize) {
        this.bookssize = bookssize;
    }
};